#!/usr/bin/python3.7
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# @Time    : 2022/8/1 21:09
# @Author  : mojin
# @Email   : 397135766@qq.com
# @File    : t_003.py
# @Software: PyCharm
#-------------------------------------------------------------------------------
import uiautomator2 as u2
from time import sleep

d = u2.connect()
d.implicitly_wait(20)
c='//*[@resourceId="电池"]/parent::*/following::android.widget.ImageView'
print(d.xpath('//*[@resource-id="com.tencent.mm:id/b79"]/android.widget.RelativeLayout[last()]/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView').info)
